package com.sure0000.practice;

import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author xuyouchang
 * @date 2020/12/29.
 */
public class MapTest {

    public static void main(String[] args) {
        Map<Object, Object> map = new HashMap<>();
        map.put("aaa", 1);
        map.put("bb", "sss");
        map.put("cc", 2L);
        map.put("dd", 23F);

        convert(map);
    }

    public static void convert(Object o) {
        Map<String, String> map = new HashMap<>();
        ((HashMap<String, Object>) o).forEach((k, v) -> {
            if (v instanceof Integer) {
                map.put(k, ((Integer)v).toString());
            }else if (v instanceof Long) {
                map.put(k, ((Long)v).toString());
            }else {
                map.put(k, v.toString());
            }

        });

        map.keySet();
    }
}
